# - Config file for the ClouCompareProjects package
# It defines the following variables
#  CCP_INCLUDE_DIRS         - include directories for CloudCompareProjects
#  CCP_LIBRARIES            - libraries to link against
#  CCP_PLUGIN_INSTALL_DIR   - the dir where plugins will be installed in the system
#  CCP_CXX_FLAGS            - the flags that were used for compilig cloudcompare projects

# Note this was made for exporting from th build tree. exporting from the install tree may require some
# changes to this file before to be ok

# current path of the cmakeconfig file
# it will simply be the build dir for build-exported tree
get_filename_component(CCP_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)

# where plugins are placed in the system
set(CCP_PLUGIN_INSTALL_DIR @CMAKE_INSTALL_PREFIX@/CloudCompare/plugins)
set(CCP_CXX_FLAGS @CMAKE_CXX_FLAGS@)

# import targets of the CloudCompareProject that may be useful for third-part plugin developers
if(NOT TARGET CloudCompareProjects) # if it is not defined yet
    include("${CCP_CMAKE_DIR}/CCPTargets.cmake")
endif()
 
# A broad range of includes to be used from your plugins
set(CCP_INCLUDE_DIRS    "@PROJECT_SOURCE_DIR@/libs/qCC_db;
                        @PROJECT_SOURCE_DIR@/libs/qCC_io;
                        @PROJECT_SOURCE_DIR@/CC/include;
                        @PROJECT_SOURCE_DIR@/qCC/db_tree;
                        @PROJECT_SOURCE_DIR@/qCC;
                        @PROJECT_SOURCE_DIR@/qCC/dialogs;
                        @PROJECT_BINARY_DIR@/qCC;
                        @PROJECT_SOURCE_DIR@/plugins;
                        @PROJECT_BINARY_DIR@/plugins"}
)


# These are the shared libraries installed in the system by CCP by default
set(CCP_LIBRARIES CC_CORE_LIB QCC_DB_LIB)

# For now only QPCL plugin is handled
if(TARGET QPCL_PLUGIN)
        set(CCP_LIBRARIES "${CCP_LIBRARIES}" QPCL_PLUGIN_UTILS_LIB)
endif()

# Qt is mandatory for working with CC code - finding it for you
find_package(Qt4 REQUIRED)
set(QT_USE_QTOPENGL TRUE)
include(${QT_USE_FILE})
add_definitions(${QT_DEFINITIONS})
include_directories(${QT_QTOPENGL_INCLUDE_DIR})



